package org.lyy.service.impl;

import org.lyy.dao.OrderDao;
import org.lyy.entity.Order;
import org.lyy.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("OrderService")
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao dao;

    @Override
    public void create(Order order) {
       try {
           dao.create(order);
       }catch(Exception e){
           System.out.println(e);
       }
    }
    @Override
    public void select(){
        try {
            dao.select();
        }catch(Exception e){
            System.out.println(e);
        }
    }
    @Override
    public void delete(String orderId){
        dao.delete(orderId);
    }

    @Override
    public void update(Order lry){
        try {
             dao.update(lry);
        }catch (Exception e){
            System.out.println(e);
        }
    }
    @Override
    public List<Order> searchStatus(String payStatus){
        return dao.searchStatus(payStatus);
    }
}
